package com.googlecode.agscrum.model.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Version;

@Entity
@SequenceGenerator(name = "seq_action", sequenceName = "seq_action")
public class Action {
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_action")
	@Column(name = "ID_ACTION")
	private Long id;
	@Version
	private Integer version;
	@Column(length = 70, nullable = false)
	private String description;
	@Column(length = 30, nullable = false)
	private String action;
	@ManyToOne
	@JoinColumn(name = "ID_RESOURCE", nullable = false)
	private Resource resource;
}
